<%@ page language="java" contentType="text/html; charset=UTF-8" import="java.util.*"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="css/blog.css" rel="stylesheet"></link>
<script src="./js/jquery.js"></script>
<script>
function init(){
	$.ajax({
		url:'listSysArticleType.do',
		type:'post',
		dataType:'json',
		data:{},
		async:true,
		success:function(list){
			for(var i = 0;i<list.length;i++){
				$("#sysArticleTypeId").append('<li><a href="#?sysArticleTypeId='+list[i].sysArticleTypeId+'">'+list[i].typeName+'</a></li>');
			}
		}
	});
}
init();
</script>

</head>
<body>
 			<%
 			String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath();//绝对路径，要在下面引用。
 			
 			System.out.println(session.getId());
 			System.out.println(new java.util.Date(session.getLastAccessedTime()));
 				
            System.out.println(application.getRealPath("/"));
            %>

    <div id="page">
        <div id="head">
            <div id="menu_bar">
                <div id="menu_bar_img">
                        <img src="img/dot.jpg"  style="margin:6px;float:left"/>
   <c:choose>
   <c:when test="${null==sessionScope.userInfo }">
                        
                        <ul id="logon">
                            <li><a href="reg_protocal.html">注册</a></li>
                            <li><label>|</label></li>
                            <li><a href="Logon.jsp">登录</a></li>
                            <li><label>|</label></li>
                        </ul>
   </c:when>
   <c:otherwise>            
                 <ul id="logon">
                            <li><label>你好${sessionScope.userInfo.regName }</label></li>
                            <li><label>|</label></li>
                            <li><a href='<%= basePath+"/logout.do"%>'>退出</a></li>
                            <li><label>|</label></li>
                        </ul>
  </c:otherwise>
  </c:choose>        
                </div>
                <div id="select">
                   
                    <select name="selectType" style="margin-top:5px;" >
                        <option>文章名</option>
                        <option>文章分类</option>
                        <option>博客名</option>
                    </select>
                    <input type="text" name="key"/>
                    <input type="button" value="检索"/>
                </div>
                <div id="about_blog">
<c:if test="${null !=sessionScope.userInfo }">
	<c:choose>
	<c:when test="${sessionScope.userInfo.blog !=null }">
                    <a href="blogIndex.jsp">我的博客</a>
                    <a href="MyInfo.jsp">我的账户信息</a>
    </c:when>
    <c:otherwise>               
                     <a href="ApplyBlog.jsp">申请博客</a>
    </c:otherwise>
    </c:choose>                     
</c:if>
                    <a href="Index.jsp">首页</a>
                </div>
            </div>
        </div>
        <!-- =============== end of  head ============================================================ -->
        
        <div id="content">
            <div id="left">
                <div class="list" style="height:50%">
                     <label>文章分类</label>
                     <ul id="sysArticleTypeId" class="none_list">
				 
                         <li><a >全部文章</a></li>
<!--                          <li><a >数据库知识</a></li> -->
<!--                          <li><a >Java Web开发</a></li> -->
                     </ul>
                </div>
                <div class="list" style="height:50%">
                    <label>博客排名</label>
                    <ul class="decimal_list">
                         <li><a>鸟叔的Linux之门</a></li>
                         <li><a>Java编程随笔</a></li>
                         <li><a>Java教学知识点集汇</a></li>
                     </ul>
                </div>
            </div>
           <iframe id="main" src="ArticleList/1/8.do"></iframe>
        </div>
        <!-- =============== end of  content ======================================================== -->
        <div id="foot">
                
<%
// 		Integer total= (Integer)application.getAttribute("total");
		
// 		total = new Integer(total.intValue()+1);
// 		application.setAttribute("total", total);
		

%>        
        
        
        
                       
        总访问数：${total},在线人数：${online},在线用户：

        </div>
        
    </div>




</body>
</html>
